package com.cn.wanxi.service;

import com.cn.wanxi.dao.CompanyDao;
import com.cn.wanxi.model.CompanyModel;

public class CompanyService {

    /**
     * 逻辑关系,所以这个方法应该写在服务逻辑层
     *
     * @return
     */
    public CompanyModel getCompanyModel() {
        CompanyModel companyModel = new CompanyModel();
        CompanyDao companyDao = new CompanyDao();
//        这里在做一个封装数据；一个方法里面只做一件事情，
        companyModel.setLogo(companyDao.getLogo());
        companyModel.setPhone(companyDao.getPhone());
        companyModel.setAddress(companyDao.getAddress());
        companyModel.setLinePhone(companyDao.getLinePhone());
        companyModel.setNet(companyDao.getNet());
        companyModel.setVersion(companyDao.getVersion());
        return companyModel;
    }
}
